package xyz.sicau.test4_topic;

import com.rabbitmq.client.Channel;
import xyz.sicau.utils.MQUtils;

import java.io.IOException;
import java.util.Scanner;
import java.util.concurrent.TimeoutException;

public class Producer {
    public static final String QUEUE = "hello";
    public static final String EXCHANGE = "MyJHJ";


    public static void main(String[] args) throws IOException, TimeoutException {
        Channel channel = MQUtils.getChannel();

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            String next = scanner.next();
            channel.basicPublish(EXCHANGE,"lazy.orange.eqwe",null,next.getBytes("utf-8"));
        }

    }
}
